import { getAction, postAction } from '@/api/manage'

// 获取最新公告
const news = (params) => getAction('/admin/notice/new', params)
// 公告列表
const list = (params) => getAction('/admin/notice/page', params)
// 获取公告详情
const detail = (params) => getAction(`/admin/notice/detail/${params}`)
// 删除公告
const del = (params) => postAction(`/admin/notice/delete/${params}`)
// 批量删除公告
const batchDel = (params) => postAction(`/admin/notice/batchDel`, params)
// 新增公告
const create = (params) => postAction('/admin/notice/create', params)
// 编辑公告
const edit = (params) => postAction('/admin/notice/update', params)

export {
  news,
  list,
  detail,
  del,
  batchDel,
  create,
  edit
}
